package cn.iocoder.yudao.module.resource.dal.dataobject.points;

import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;

/**
 * 积分记录 DO
 *
 * @author 芋道源码
 */
@TableName(value = "resource_points_record", autoResultMap = true)
@KeySequence("resource_points_record_seq")
@Data
@EqualsAndHashCode(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ResourcePointsRecordDO extends TenantBaseDO {

    /**
     * 记录ID
     */
    @TableId
    private Long id;

    /**
     * 创作者ID
     */
    private Long creatorId;

    /**
     * 类型
     *
     * 枚举 1-入驻 2-上传资源 3-资源被收藏 4-资源被下载
     */
    private Integer type;

    /**
     * 积分变动
     *
     * 正数为增加,负数为减少
     */
    private Integer points;

    /**
     * 变动后余额
     */
    private Integer balance;

    /**
     * 业务ID
     *
     * 如资源ID等
     */
    private Long businessId;

    /**
     * 描述
     */
    private String description;

}
